package org.zk.entity;

import lombok.Data;

//扩展了balance属性
@Data
public class UserExt{


    private Integer id;
    private String username;
    private Float balance;//余额
    private Integer power;//信用
    private String createAt;
    private String qq;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Float getBalance() {
        return balance;
    }

    public void setBalance(Float balance) {
        this.balance = balance;
    }

    public Integer getPower() {
        return power;
    }

    public void setPower(Integer power) {
        this.power = power;
    }

    public String getCreateAt() {
        return createAt;
    }

    public void setCreateAt(String createAt) {
        this.createAt = createAt;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public UserExt() {
    }

    public UserExt(User user){
        this.id = user.getId();
        this.username = user.getUsername()==null?"":user.getUsername();
        this.power = user.getPower()==null?0:user.getPower();
        this.createAt = user.getCreateAt()==null?"":user.getCreateAt();
        this.qq = user.getQq() == null?"":user.getQq();
    }




}
